{include file="public/head"/} 
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a><cite>后台管理</cite></a>
        <a><cite>停车场地管理中心</cite></a>
        <a><cite>进出设备管理</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so"  method="get" action="#">
          
         
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
      <xblock>
        <!--<button class="layui-btn" onclick="x_admin_show('添加设备','{:url('cameraAdd')}',700,700)"><i class="layui-icon"></i>添加设备</button>-->
        <span class="x-right" style="line-height:40px">共有数据：{$number} 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
            <!-- <th style="text-align: center; font-size: 16px;">
              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th> -->
            <th style="text-align: center; font-size: 16px;">通道编号</th>
            <th style="text-align: center; font-size: 16px;">通道名称</th>
            <th style="text-align: center; font-size: 16px;">通道类型</th>
            <th style="text-align: center; font-size: 16px;">停车场名称</th>
            <th style="text-align: center; font-size: 16px;">操作</th>
         
          </tr>
        </thead>
        <tbody>
          {foreach $list as $lis}
          <tr>
            
            <td style="text-align: center;">{$lis.id}</td>
            <td style="text-align: center;">{$lis.cam_name}</td>
            <td style="text-align: center;">
                {if $lis.cam_type == 1}
                入口
              {elseif $lis.cam_type == 2}
                出口
              {/if}
            </td>
            <td style="text-align: center;">{$lis.parkingName}</td>
           
				
			 <td>
			     {if $lis.cam_type ==2}
			     <a title="获取支付链接"  onclick="getpay('{$lis.id}')" href="javascript:;">
                    <i class="layui-icon">&#xe641;</i>
                  </a>
                 {/if}</td>
                  
          </tr>
          {/foreach}
        </tbody>
      </table>
      <div class="page">
        <div>
        </div>
      </div>

    </div>
    <script>
      layui.use('laydate', function(){
        var laydate = layui.laydate;
        
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });
      });

      function getpay(id){
        layer.open({
          type: 1,
          skin: 'x-right', //样式类名
          closeBtn: 0, //不显示关闭按钮
          anim: 2,
          shadeClose: true, //开启遮罩关闭
          area: ['80%', '300px'],
          content: 
          '<div style="padding: 20px 100px; font-size:18px">'+
          '支付链接：https://www.aliwgzf.com/index/order/outpay?id='+ id + '<br><br>'+
		  
         
          '</div>'
        });
      }
		//进门扫码开门
	  function come(id){
        layer.open({
          type: 1,
          skin: 'x-right', //样式类名
          closeBtn: 0, //不显示关闭按钮
          anim: 2,
          shadeClose: true, //开启遮罩关闭
          area: ['80%', '300px'],
          content: 
          '<div style="padding: 20px 100px; font-size:18px">'+
          '扫码开门链接：https://www.fqsc.zfbzhsq.com/admin/Unlicensed/noCards?system='+ id + '<br><br>'+
          '</div>'
        });
      }
      //删除
      function parkingDel(id, doc){
        if(confirm('确定要删除吗?')) 
        { 
          var url = "{:url('systemDel')}?id=" + id
          // console.log(url)
          $('#' + doc).attr('href', url)
        } 
          return false; 
      }
    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  </body>

</html>